home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.ms-windows.programmer.tools.mfc,comp.os.ms-windows.apps.compatibility.win95,comp.lang.c++
- Path: king.mcs.drexel.edu!urcrawfo
- From: urcrawfo@mcs.drexel.edu (Programmer)
- Subject: Re: HELP !!! Memory - Allocation
- Message-ID: <1996Jan28.015441.7082@mcs.drexel.edu>
- Followup-To: comp.os.ms-windows.programmer.tools.mfc,comp.os.ms-windows.apps.compatibility.win95,comp.lang.c++
- Organization: Drexel University, Dept. of Math. and Comp. Sci.
- X-Newsreader: TIN [version 1.2 PL2]
- References: <NEWTNews.751.822443462.Postmaster@Jerusalem.netvision.net.il>
- Date: Sun, 28 Jan 96 01:54:41 GMT
-
- iti@Jerusalem.netvision.net.il wrote:
-
-
- : I am using Visual C++ to write a Windows Application - and I am having
- : a memory problem. I want to dynamically allocate "nTemp" bytes of memory
- : to read in a char string, or the most memory available up to "nTemp"
- : bytes.
-
- : My questions being:
- : 1. How can I most efficiantly do this?
- : 2. Should I use
- : -> pChar = (char*) malloc(nTemp); Or
- : -> pChar = new char[nTemp];
-
- : Please send any advice you have for me to my EMail address:
- : iti@netvision.net.il
-
- : Thanks
- : Yaakov
-
- Hello:
-
- It is highly recommended using the "new" operator when using C++.
- It is both practical and effifienct.
-
-
- Ronski
-
-